home *** CD-ROM | disk | FTP | other *** search
/ Cyber Strip Poker / Cyber Strip Poker.rar / IMAGE.img / poker38.dir / 00002_Script_2 < prev    next >
Text File  |  1995-08-14  |  25KB  |  895 lines

  1. on betenabler flag
  2.   nothing
  3. end betenabler 
  4.  
  5. ON UNPUPBUTS
  6.   REPEAT WITH I= 15 TO 24
  7.     SET THE VISIBILITY OF SPRITE I TO FALSE
  8.   END REPEAT
  9. END UNPUPBUTS
  10.  
  11. ON PUPBUTS
  12.   REPEAT WITH I= 15 TO 24
  13.     SET THE VISIBILITY OF SPRITE I TO TRUE
  14.   END REPEAT
  15. END PUPBUTS
  16.  
  17. on newgame2 amt
  18.   global HardAmount
  19.   setpuppets
  20.   set hardamount=amt
  21.   go "Pre"
  22. end newgame2
  23.  
  24. on menusetbet betval
  25.   global ybet,dbet,ybank,dbank,pot
  26.   set ybet=betval
  27.   if ybet<5 then 
  28.     set ybet=0
  29.     set the text of cast "bets" = "$"&dbet&return&return&return&"FOLD"
  30.     set the text of cast "info"="MY BANK:"&RETURN&"$"&dbank&RETURN&RETURN&"MY BET:"&RETURN&"$"&Dbet ¼
  31. &RETURN&RETURN&"POT:"&RETURN&"$"&pot&RETURN&RETURN&"YOUR BET:"&RETURN&"FOLD"&RETURN&RETURN ¼
  32. &"U BANK:"&RETURN&"$"&ybank  
  33.     exit
  34.   end if
  35.   set the text of cast "bets" = "$"&dbet&return&return&return&"$"&ybet
  36.   setinfo
  37.   
  38.   if the frame > 55 then
  39.     okbet2
  40.   else 
  41.     okbet
  42.   end if
  43.   
  44. end menusetbet
  45.  
  46. on setinfo
  47.   global ybank,dbank,pot,ybet,dbet
  48.   set the text of cast "info"="MY BANK:"&RETURN&"$"&dbank&RETURN&RETURN&"MY BET:"&RETURN&"$"&Dbet ¼
  49. &RETURN&RETURN&"POT:"&RETURN&"$"&pot&RETURN&RETURN&"YOUR BET:"&RETURN&"$"&ybet&RETURN&RETURN ¼
  50. &"U BANK:"&RETURN&"$"&ybank
  51. end setinfo
  52.  
  53. on Check
  54.   global yoldbet,doldbet,ybet,dbet,ybank,dbank,pot
  55.   set the text of cast "bettext"="Place Your Second Bet"
  56.   set dbet=0
  57.   set ybet=5
  58.   set the text of cast "bets" = "$"&dbet&return&return&return&"$"&ybet
  59.   setinfo  
  60.   set yoldbet=0
  61.   set doldbet=5
  62.   checkhand
  63.   checkdhandfinal
  64.   go "ybet2"
  65. end Check
  66.  
  67. on ablemenu themenu, flag
  68.   nothing
  69. end ablemenu
  70.  
  71. on Okbet2
  72.   global ybet,dbet,ycard1,ycard2,ycard3,ycard4,ycard5,yoldbet,pot, ybank
  73.   betenabler (false)
  74.   if ybet=0 then
  75.     set ycard1=52
  76.     set ycard2=52
  77.     set ycard3=52
  78.     set ycard4=52
  79.     set ycard5=52
  80.     set the text of cast B35 = "You Fold"
  81.     set the text of cast b34 = "I Win By Default"
  82.     go "FOLD"
  83.     exit
  84.   end if
  85.   if ybet<dbet then beep(1)
  86.   if ybet>dbet then
  87.     set the text of cast "bettext"="You Bet "&Ybet
  88.     set pot=pot+(ybet-yoldbet)
  89.     set ybank=ybank-(ybet-yoldbet)
  90.     set the text of cast "yscore" = "$"&ybank
  91.     set the text of cast "pot" = "$"&pot
  92.     setinfo
  93.     set yoldbet=ybet
  94.     play "y2pot" 
  95.     go "Dbet2"
  96.     exit
  97.   end if
  98.   if ybet=dbet then
  99.     set the text of cast "bettext"="You Call With "&Ybet
  100.     set pot=pot+(ybet-yoldbet)
  101.     set ybank=ybank-(ybet-yoldbet)
  102.     set the text of cast "yscore" = "$"&ybank
  103.     set the text of cast "pot" = "$"&pot
  104.     setinfo
  105.     set yoldbet=ybet
  106.     play "y2pot"
  107.     starttimer
  108.     repeat while the timer<60
  109.     end repeat
  110.     checkwinner  
  111.     exit  
  112.   end if  
  113. end okbet2
  114.  
  115. on dbet2
  116.   global ybank,dbank,Pot,ybet,dbet,dfeel,doldbet
  117.   set doldbet=dbet
  118.   if abs(ybet-dfeel)<15 then
  119.     dcall2
  120.     play "D2pot"
  121.     checkwinner
  122.     exit
  123.   end if
  124.   if ybet-dfeel>14 then
  125.     if random(4)=1 then
  126.       dfold
  127.       exit
  128.     else 
  129.       Dcall2
  130.       play "D2pot"
  131.       checkwinner
  132.       exit
  133.     end if    
  134.   end if
  135.   if ybet-dfeel>45 then
  136.     if random(2)=1 then 
  137.       Dfold
  138.       exit
  139.     else 
  140.       Dcall2
  141.       play "D2pot"
  142.       checkwinner
  143.       exit 
  144.     end if
  145.   end if
  146.   if dfeel-ybet>60 then
  147.     set dbet=ybet+(integer((dfeel-ybet)*.10)*5)
  148.     if dbet>100 then set dbet = 100
  149.     raise2
  150.     play "D2pot"
  151.     exit
  152.   end if
  153.   if dfeel-ybet>14 then
  154.     if random (2)=1 then
  155.       set dbet=ybet+(integer((dfeel-ybet)*.04)*5)
  156.       if dbet>100 then set dbet = 100
  157.       raise2
  158.       play "D2pot"
  159.       exit
  160.     else
  161.       Dcall2
  162.       play "D2pot"
  163.       checkwinner
  164.       exit 
  165.     end if  
  166.   end if 
  167.   exit
  168.   beep(3)
  169. end dbet2
  170.  
  171. on dbet
  172.   global ybank,dbank,Pot,ybet,dbet,dfeel,doldbet
  173.   set doldbet=dbet
  174.   if abs(ybet-dfeel)<15 then
  175.     dcall
  176.     play "D2pot"
  177.     go "flip"
  178.     exit
  179.   end if
  180.   if ybet-dfeel>14 then
  181.     if random(4)=1 then
  182.       dfold
  183.       exit
  184.     else 
  185.       Dcall
  186.       play "D2pot"
  187.       go "flip"
  188.       exit
  189.     end if    
  190.   end if
  191.   if ybet-dfeel>40 then
  192.     if random(2)=1 then 
  193.       Dfold
  194.       exit
  195.     else 
  196.       Dcall
  197.       play "D2pot"
  198.       go "flip"
  199.       exit 
  200.     end if
  201.   end if
  202.   if dfeel-ybet>60 then
  203.     set dbet=ybet+(integer((dfeel-ybet)*.10)*5)
  204.     if dbet>100 then set dbet = 100
  205.     raise
  206.     play "D2pot"
  207.     exit
  208.   end if
  209.   if dfeel-ybet>14 then
  210.     if random(2)=1 then
  211.       set dbet=ybet+(integer((dfeel-ybet)*.04)*5)
  212.       if dbet>100 then set dbet = 100
  213.       raise
  214.       play "D2pot"
  215.       exit 
  216.     else
  217.       Dcall
  218.       go "flip"
  219.       play "D2pot"
  220.       exit 
  221.     end if   
  222.   end if 
  223.   beep(3)
  224. end dbet
  225.  
  226. on raise
  227.   global ybet,dbet,pot,doldbet,dbank,ybank
  228.   if abs(dbet-ybet)<5 then 
  229.     Dcall
  230.     exit  
  231.   end if
  232.   puppetsound "draise"
  233.   set the text of cast "bets" = "$"&dbet&return&return&return&"$"&ybet 
  234.   set temp=dbet-ybet
  235.   set the text of cast "bettext"="Dealer Calls And Raises "&temp
  236.   set pot=pot+(dbet-doldbet)
  237.   set dbank=dbank-(dbet-doldbet)
  238.   set the text of cast "pot" = "$"&pot
  239.   set the text of cast "dscore" = "$"&dbank
  240.   setinfo
  241.   go "Ybet"
  242. end raise
  243.  
  244. on raise2
  245.   global ybet,dbet,pot,doldbet,dbank,ybank
  246.   if abs(dbet-ybet)<5 then 
  247.     Dcall2
  248.     exit  
  249.   end if
  250.   puppetsound "draise"
  251.   set the text of cast "bets" = "$"&dbet&return&return&return&"$"&ybet
  252.   set temp=dbet-ybet
  253.   set the text of cast "bettext"="Dealer Calls And Raises "&temp
  254.   set pot=pot+(dbet-doldbet)
  255.   set dbank=dbank-(dbet-doldbet)
  256.   set the text of cast "pot" = "$"&pot
  257.   set the text of cast "dscore" = "$"&dbank
  258.   setinfo
  259.   go "Ybet2"
  260. end raise2
  261.  
  262. on dfold
  263.   global dbet,ybet,dcard1,dcard2,dcard3,dcard4,dcard5,ybank,dbank,pot
  264.   set dcard1=52
  265.   set dcard2=52
  266.   set dcard3=52 
  267.   set dcard4=52
  268.   set dcard5=52
  269.   set the text of cast B34="I Got crapà I Fold"
  270.   set the text of cast B35 = "You Winà I Folded"
  271.   set the text of cast "bets" = "FOLD"&return&return&return&"$"&ybet
  272.   setinfo  
  273.   Go "Ywin"
  274. end dfold
  275.  
  276. on dcall
  277.   global dbet,ybet,pot,doldbet,dbank,ybank
  278.   puppetsound "dcall"
  279.   set dbet=ybet
  280.   set the text of cast "bettext" = "Dealer Calls"
  281.   set the text of cast "bets" = "$"&dbet&return&return&return&"$"&ybet
  282.   set pot=pot+(dbet-doldbet)
  283.   set dbank=dbank-(dbet-doldbet)
  284.   set the text of cast "pot" = "$"&pot
  285.   setinfo
  286.   set the text of cast "dscore" = "$"&dbank
  287. end dcall
  288.  
  289. on dcall2
  290.   global dbet,ybet,pot,doldbet,dbank,ybank
  291.   puppetsound "dcall"
  292.   set dbet=ybet
  293.   set the text of cast "bettext" = "Dealer Calls"
  294.   set the text of cast "bets" = "$"&dbet&return&return&return&"$"&ybet 
  295.   set pot=pot+(dbet-doldbet)
  296.   set dbank=dbank-(dbet-doldbet)
  297.   set the text of cast "pot" = "$"&pot
  298.   setinfo
  299.   set the text of cast "dscore" = "$"&dbank
  300. end dcall2
  301.  
  302. on Okbet
  303.   global ybet,dbet,ycard1,ycard2,ycard3,ycard4,ycard5,yoldbet,pot, ybank
  304.   betenabler (false)
  305.   if ybet=0 then
  306.     set ycard1=52
  307.     set ycard2=52
  308.     set ycard3=52
  309.     set ycard4=52
  310.     set ycard5=52
  311.     set the text of cast B35 = "You Fold"
  312.     set the text of cast b34 = "I Win By Default"
  313.     go "FOLD"
  314.     exit
  315.   end if
  316.   if ybet<dbet then beep(1)
  317.   if ybet>dbet then
  318.     set the text of cast "bettext"="You Bet "&Ybet
  319.     set pot=pot+(ybet-yoldbet)
  320.     set ybank=ybank-(ybet-yoldbet)
  321.     set the text of cast "yscore" = "$"&ybank
  322.     set the text of cast "pot" = "$"&pot
  323.     setinfo
  324.     set yoldbet=ybet
  325.     play "y2pot" 
  326.     go "Dbet"
  327.     exit
  328.   end if
  329.   if ybet=dbet then
  330.     set the text of cast "bettext"="You Call With "&Ybet
  331.     set pot=pot+(ybet-yoldbet)
  332.     set ybank=ybank-(ybet-yoldbet)
  333.     set the text of cast "yscore" = "$"&ybank
  334.     set the text of cast "pot" = "$"&pot
  335.     setinfo
  336.     set yoldbet=ybet
  337.     play "y2pot"
  338.     starttimer
  339.     repeat while the timer<60
  340.     end repeat
  341.     go "flip"  
  342.     exit  
  343.   end if  
  344. end okbet
  345.  
  346. on initVariables
  347.   betenabler (false)
  348.   m13inch
  349.   global ybank,dbank,Pot,ybet,dbet,dfeel,hardamount
  350.   set ybet=5
  351.   set dbet=0
  352.   set dfeel=0
  353.   set the text of cast "bets" = "$"&dbet&return&return&return&"$"&ybet 
  354.   put 0 into Pot
  355.   put hardamount into ybank
  356.   put hardamount into dbank
  357.   set the text of cast "yscore" = "$"&ybank
  358.   set the text of cast "dscore" = "$"&dbank
  359.   setinfo
  360. end initVariables
  361.  
  362. on Ante
  363.   global ybank,pot,ybet,dbet,dbank,yoldbet,doldbet
  364.   puppetsound "Ante"
  365.   set the text of cast "bettext"="Ante Up"
  366.   set ybet=5
  367.   set yoldbet=0
  368.   set ybank=ybank-5
  369.   set the text of cast "yscore" = "$"&ybank
  370.   play "y2pot" 
  371.   set pot=pot +5
  372.   set the text of cast "pot" = "$"&pot 
  373.   set dbet=0
  374.   set doldbet=0
  375.   set dbank=dbank-5
  376.   set the text of cast "dscore" = "$"&dbank
  377.   play "d2pot" 
  378.   set pot=pot +5
  379.   set the text of cast "pot" = "$"&pot
  380.   setinfo
  381.   go "YCards"
  382.   exit
  383. end Ante
  384.  
  385. on YMoney
  386.   global ybank,pot
  387.   set Ybank=Ybank+pot
  388.   set the text of cast "yscore" = "$"&ybank 
  389.   set pot=0
  390.   set the text of cast "pot" = "$"&pot
  391.   setinfo
  392.   go "restart"
  393.   exit
  394. End YMoney
  395.  
  396. on DMoney
  397.   global Dbank,pot
  398.   set Dbank=Dbank+pot
  399.   set the text of cast "Dscore" = "$"&Dbank 
  400.   set pot=0
  401.   set the text of cast "pot" = "$"&pot
  402.   setinfo
  403.   go "restart"
  404.   exit
  405. End DMoney
  406.  
  407. on checkwinner
  408.   global yv,dv,yh,dh,yh2,dh2,hand,dhand,ybank,dbank,pot
  409.   set the text of cast B34 = dhand
  410.   set the text of cast B35 = hand
  411.   set the text of cast "yscore" = "$"&ybank
  412.   set the text of cast "dscore" = "$"&dbank
  413.   setinfo  
  414.   if yv>dv then 
  415.     set the text of cast "yscore" = "$"&ybank
  416.     set the text of cast "dscore" = "$"&dbank
  417.     setinfo 
  418.     go "YWin"
  419.     exit
  420.   end if
  421.   if yv=dv then
  422.     if yh>dh then
  423.       set the text of cast "yscore" = "$"&ybank
  424.       set the text of cast "dscore" = "$"&dbank
  425.       setinfo  
  426.       go "YWin"
  427.       exit
  428.     end if
  429.     if yh=dh then
  430.       if Yh2>dh2 then
  431.         set the text of cast "yscore" = "$"&ybank
  432.         set the text of cast "dscore" = "$"&dbank
  433.         setinfo
  434.         go "YWin"
  435.         exit
  436.       end if   
  437.     end if
  438.   end if
  439.   set the text of cast "yscore" = "$"&ybank
  440.   set the text of cast "dscore" = "$"&dbank
  441.   setinfo  
  442.   go "DWin"
  443. end checkwinner
  444.  
  445. on startmovie
  446.   --SIZE OF MONITOR
  447.   global size
  448.   set size=true
  449.   --
  450.   setpuppets
  451.   global Pot,ybet,dbet,dfeel,ybank,dbank
  452.   set ybet=5
  453.   set dbet=0
  454.   set dfeel=0
  455.   set pot = 0
  456.   set the text of cast "bets" = "$"&dbet&return&return&return&"$"&ybet
  457.   setinfo   
  458. end startmovie
  459.  
  460. on setpuppets
  461.   puppetsprite 15, true
  462.   set the locH of sprite 15 to 40
  463.   set the locV of sprite 15 to 40
  464.   set the castnum of sprite 15 to 248
  465.   puppetsprite 16, true
  466.   set the locH of sprite 16 to 90
  467.   set the locV of sprite 16 to 40
  468.   set the castnum of sprite 16 to 248
  469.   puppetsprite 17, true
  470.   set the locH of sprite 17 to 140
  471.   set the locV of sprite 17 to 40
  472.   set the castnum of sprite 17 to 248
  473.   puppetsprite 18, true
  474.   set the locH of sprite 18 to 190
  475.   set the locV of sprite 18 to 40
  476.   set the castnum of sprite 18 to 248
  477.   puppetsprite 19, true
  478.   set the locH of sprite 19 to 240
  479.   set the locV of sprite 19 to 40
  480.   set the castnum of sprite 19 to 248
  481.   puppetsprite 20, true 
  482.   set the locH of sprite 20 to 211
  483.   set the locV of sprite 20 to 388
  484.   set the castnum of sprite 20 to 245
  485.   puppetsprite 21, true
  486.   set the locH of sprite 21 to 269
  487.   set the locV of sprite 21 to 388
  488.   set the castnum of sprite 21 to 245
  489.   puppetsprite 22, true
  490.   set the locH of sprite 22 to 321
  491.   set the locV of sprite 22 to 388
  492.   set the castnum of sprite 22 to 245
  493.   puppetsprite 23, true
  494.   set the locH of sprite 23 to 376
  495.   set the locV of sprite 23 to 388
  496.   set the castnum of sprite 23 to 245
  497.   puppetsprite 24, true
  498.   set the locH of sprite 24 to 430
  499.   set the locV of sprite 24 to 388
  500.   set the castnum of sprite 24 to 245
  501. end setpuppets
  502.  
  503. on M13inch
  504.   global size
  505.   set size=true
  506.   puppetsprite 6, False
  507.   set the locV of sprite 20 to 388
  508.   set the locV of sprite 21 to 388
  509.   set the locV of sprite 22 to 388
  510.   set the locV of sprite 23 to 388
  511.   set the locV of sprite 24 to 388
  512. end M13inch
  513.  
  514. on M12inch
  515.   global size
  516.   set size=false
  517.   puppetsprite 6, true
  518.   set the castnum of sprite 6 = 3
  519.   set the loch of sprite 6 to 398
  520.   set the locv of sprite 6 to 54
  521.   set the locV of sprite 20 to 352
  522.   set the locV of sprite 21 to 352
  523.   set the locV of sprite 22 to 352
  524.   set the locV of sprite 23 to 352
  525.   set the locV of sprite 24 to 352
  526. end M12inch
  527.  
  528. On Namer
  529.   global namein,nameout
  530.   if Namein=0 then set nameout="Deuce"
  531.   if Namein=1 then set nameout="Three"
  532.   if Namein=2 then set nameout="Four"
  533.   if Namein=3 then set nameout="Five"
  534.   if Namein=4 then set nameout="Six"
  535.   if Namein=5 then set nameout="Seven"
  536.   if Namein=6 then set nameout="Eight"
  537.   if Namein=7 then set nameout="Nine"
  538.   if Namein=8 then set nameout="Ten"
  539.   if Namein=9 then set nameout="Jack"
  540.   if Namein=10 then 
  541.     if random(2)=2 then set nameout="Queen"
  542.     else set nameout = "Lady"
  543.   end if 
  544.   if Namein=11 then set nameout="King"
  545.   if Namein=12 then set nameout="Ace"
  546. end Namer
  547.  
  548. on bossStart
  549.   when timeout then Nothing
  550.   sound stop 1
  551.   sound stop 2
  552. end bossStart
  553.  
  554. on bossOver
  555.   nothing
  556. end bossOver
  557.  
  558. on replaceCards
  559.   global cardup1,cardup2,cardup3,cardup4,cardup5
  560.   global ycard1,ycard2,ycard3,ycard4,ycard5,ycard6,ycard7,ycard8,ycard9,ycard10
  561.   if (cardup1+cardup2+cardup3+cardup4+cardup5)=5 then
  562.     go "Chek"
  563.     exit
  564.   end if
  565.   if cardup1=False then set ycard1=ycard6
  566.   if cardup2=False then set ycard2=ycard7
  567.   if cardup3=False then set ycard3=ycard8
  568.   if cardup4=False then set ycard4=ycard9
  569.   if cardup5=False then set ycard5=ycard10 
  570.   sort
  571.   set the castnum of sprite 20 to 245
  572.   set the castnum of sprite 21 to 245
  573.   set the castnum of sprite 22 to 245
  574.   set the castnum of sprite 23 to 245
  575.   set the castnum of sprite 24 to 245
  576. end replaceCards
  577.  
  578. on card1
  579.   global cardup1,cardup2,cardup3,cardup4,cardup5,ycard1
  580.   if ((cardup1+cardup2+cardup3+cardup4+cardup5)<3 and cardup1=True) then exit
  581.   set cardup1=not(cardup1)
  582.   puppetsound "deal"&random(5)
  583.   if cardup1=False then set the castnum of sprite 20 to 245
  584.   else set the castnum of sprite 20 to (193+ycard1)  
  585. end card1 
  586. on card2
  587.   global cardup1,cardup2,cardup3,cardup4,cardup5,ycard2
  588.   if ((cardup1+cardup2+cardup3+cardup4+cardup5)<3 and cardup2=True) then exit
  589.   set cardup2=not(cardup2)
  590.   puppetsound "deal"&random(5)
  591.   if cardup2=False then set the castnum of sprite 21 to 245
  592.   else set the castnum of sprite 21 to (193+ycard2)  
  593. end card2
  594. on card3
  595.   global cardup1,cardup2,cardup3,cardup4,cardup5,ycard3
  596.   if ((cardup1+cardup2+cardup3+cardup4+cardup5)<3 and cardup3=True) then exit
  597.   set cardup3=not(cardup3)
  598.   puppetsound "deal"&random(5)
  599.   if cardup3=False then set the castnum of sprite 22 to 245
  600.   else set the castnum of sprite 22 to (193+ycard3)  
  601. end card3
  602. on card4
  603.   global cardup1,cardup2,cardup3,cardup4,cardup5,ycard4
  604.   if ((cardup1+cardup2+cardup3+cardup4+cardup5)<3 and cardup4=True) then exit
  605.   set cardup4=not(cardup4)
  606.   puppetsound "deal"&random(5)
  607.   if cardup4=False then set the castnum of sprite 23 to 245
  608.   else set the castnum of sprite 23 to (193+ycard4)  
  609. end card4
  610. on card5
  611.   global cardup1,cardup2,cardup3,cardup4,cardup5,ycard5
  612.   if ((cardup1+cardup2+cardup3+cardup4+cardup5)<3 and cardup5=True) then exit
  613.   set cardup5=not(cardup5)
  614.   puppetsound "deal5"
  615.   if cardup5=False then set the castnum of sprite 24 to 245
  616.   else set the castnum of sprite 24 to (193+ycard5)  
  617. end card5
  618.  
  619. on sort
  620.   puppetsound 0
  621.   set temp=-1
  622.   global ycard1,ycard2,ycard3,ycard4,ycard5,ycard6,ycard7,ycard8
  623.   global dcard1,dcard2,dcard3,dcard4,dcard5,dcard6,dcard7,dcard8
  624.   global y1,y2,y3,y4,y5
  625.   global ys1,ys2,ys3,ys4,ys5
  626.   global d1,d2,d3,d4,d5
  627.   global ds1,ds2,ds3,ds4,ds5
  628.   global cardUp1,cardUp2,cardUp3,cardUp4,cardUp5
  629.   put true into cardup1
  630.   put true into cardup2
  631.   put true into cardup3
  632.   put true into cardup4
  633.   put true into cardup5
  634.   --
  635.   if (ycard2 mod 13) < (ycard1 mod 13) then
  636.     set temp=ycard2
  637.     set ycard2=ycard1
  638.     set ycard1=temp
  639.   end if
  640.   --
  641.   if (ycard3 mod 13) < (ycard2 mod 13) then
  642.     if (ycard3 mod 13) < (ycard1 mod 13) then
  643.       set temp=ycard3
  644.       set ycard3=ycard2
  645.       set ycard2=ycard1
  646.       set ycard1=temp
  647.     else
  648.       set temp=ycard3
  649.       set ycard3=ycard2
  650.       set ycard2=temp
  651.     end if
  652.   end if
  653.   --
  654.   if (ycard4 mod 13) < (ycard3 mod 13) then
  655.     if (ycard4 mod 13) < (ycard2 mod 13) then
  656.       if (ycard4 mod 13) < (ycard1 mod 13) then
  657.         set temp= ycard4
  658.         set ycard4=ycard3
  659.         set ycard3=ycard2
  660.         set ycard2=ycard1
  661.         set ycard1=temp
  662.       else
  663.         set temp=ycard4
  664.         set ycard4=ycard3
  665.         set ycard3=ycard2
  666.         set ycard2=temp
  667.       end if
  668.     else
  669.       set temp = ycard4
  670.       set ycard4=ycard3
  671.       set ycard3=temp
  672.     end if
  673.   end if
  674.   --
  675.   if (ycard5 mod 13) < (ycard4 mod 13) then
  676.     if (ycard5 mod 13) < (ycard3 mod 13) then
  677.       if (ycard5 mod 13) < (ycard2 mod 13) then
  678.         if (ycard5 mod 13) < (ycard1 mod 13) then
  679.           set temp= ycard5
  680.           set ycard5=ycard4
  681.           set ycard4=ycard3
  682.           set ycard3=ycard2
  683.           set ycard2=ycard1
  684.           set ycard1=temp
  685.         else 
  686.           set temp=ycard5
  687.           set ycard5=ycard4
  688.           set ycard4=ycard3
  689.           set ycard3=ycard2
  690.           set ycard2=temp
  691.         end if  
  692.       else   
  693.         set temp=ycard5
  694.         set ycard5=ycard4
  695.         set ycard4=ycard3
  696.         set ycard3=temp
  697.       end if
  698.     else
  699.       set temp=ycard5
  700.       set ycard5=ycard4
  701.       set ycard4=temp
  702.     end if
  703.   end if
  704.   --*************Dealers cards
  705.   if (dcard2 mod 13) < (dcard1 mod 13) then
  706.     set temp=dcard1
  707.     set dcard1=dcard2
  708.     set dcard2=temp
  709.   end if
  710.   --
  711.   if (dcard3 mod 13) < (dcard2 mod 13) then
  712.     if (dcard3 mod 13) < (dcard1 mod 13) then
  713.       set temp=dcard3
  714.       set dcard3=dcard2
  715.       set dcard2=dcard1
  716.       set dcard1=temp
  717.     else
  718.       set temp=dcard3
  719.       set dcard3=dcard2
  720.       set dcard2=temp
  721.     end if
  722.   end if
  723.   --
  724.   if (dcard4 mod 13) < (dcard3 mod 13) then
  725.     if (dcard4 mod 13) < (dcard2 mod 13) then
  726.       if (dcard4 mod 13) < (dcard1 mod 13) then
  727.         set temp= dcard4
  728.         set dcard4=dcard3
  729.         set dcard3=dcard2
  730.         set dcard2=dcard1
  731.         set dcard1=temp
  732.       else
  733.         set temp=dcard4
  734.         set dcard4=dcard3
  735.         set dcard3=dcard2
  736.         set dcard2=temp
  737.       end if
  738.     else
  739.       set temp = dcard4
  740.       set dcard4=dcard3
  741.       set dcard3=temp
  742.     end if
  743.   end if
  744.   --
  745.   if (dcard5 mod 13) < (dcard4 mod 13) then
  746.     if (dcard5 mod 13) < (dcard3 mod 13) then
  747.       if (dcard5 mod 13) < (dcard2 mod 13) then
  748.         if (dcard5 mod 13) < (dcard1 mod 13) then
  749.           set temp= dcard5
  750.           set dcard5=dcard4
  751.           set dcard4=dcard3
  752.           set dcard3=dcard2
  753.           set dcard2=dcard1
  754.           set dcard1=temp
  755.         else 
  756.           set temp=dcard5
  757.           set dcard5=dcard4
  758.           set dcard4=dcard3
  759.           set dcard3=dcard2
  760.           set dcard2=temp
  761.         end if  
  762.       else   
  763.         set temp=dcard5
  764.         set dcard5=dcard4
  765.         set dcard4=dcard3
  766.         set dcard3=temp
  767.       end if
  768.     else
  769.       set temp=dcard5
  770.       set dcard5=dcard4
  771.       set dcard4=temp
  772.     end if
  773.   end if
  774.   
  775.   set y1=(ycard1 mod 13)
  776.   set ys1=(ycard1 / 13)
  777.   set y2=(ycard2 mod 13)
  778.   set ys2=(ycard2 / 13)
  779.   set y3=(ycard3 mod 13)
  780.   set ys3=(ycard3 / 13)
  781.   set y4=(ycard4 mod 13)
  782.   set ys4=(ycard4 / 13)
  783.   set y5=(ycard5 mod 13)
  784.   set ys5=(ycard5 / 13)
  785.   
  786.   set d1=(dcard1 mod 13)
  787.   set ds1=(dcard1 / 13)
  788.   set d2=(dcard2 mod 13)
  789.   set ds2=(dcard2 / 13)
  790.   set d3=(dcard3 mod 13)
  791.   set ds3=(dcard3 / 13)
  792.   set d4=(dcard4 mod 13)
  793.   set ds4=(dcard4 / 13)
  794.   set d5=(dcard5 mod 13)
  795.   set ds5=(dcard5 / 13)  
  796. end sort
  797.  
  798. on shuffle
  799.   global hand, dhand
  800.   Put "Nothing Special" into hand
  801.   Put "Nothing At All" into dhand
  802.   global ycard1,ycard2,ycard3,ycard4,ycard5,ycard6,ycard7,ycard8,ycard9,ycard10
  803.   set ycard1=(random(52)-1)
  804.   set ycard2=(random(52)-1)
  805.   set ycard3=(random(52)-1)
  806.   set ycard4=(random(52)-1)
  807.   set ycard5=(random(52)-1)
  808.   set ycard6=(random(52)-1)
  809.   set ycard7=(random(52)-1)
  810.   set ycard8=(random(52)-1)
  811.   set ycard9=(random(52)-1)
  812.   set ycard10=(random(52)-1)
  813.   global dcard1,dcard2,dcard3,dcard4,dcard5,dcard6,dcard7,dcard8
  814.   set dcard1=(random(52)-1)
  815.   set dcard2=(random(52)-1)
  816.   set dcard3=(random(52)-1)
  817.   set dcard4=(random(52)-1)
  818.   set dcard5=(random(52)-1)
  819.   set dcard6=(random(52)-1)
  820.   set dcard7=(random(52)-1)
  821.   set dcard8=(random(52)-1)
  822.   --
  823.   set ycard1=(random(52)-1)
  824.   repeat while (ycard2 = ycard1)
  825.     set ycard2=(random(52)-1)
  826.   end repeat
  827.   repeat while (ycard3=ycard1 or ycard3=ycard2)
  828.     set ycard3=(random(52)-1) 
  829.   end repeat
  830.   repeat while (ycard4=ycard1 or ycard4=ycard2 or ycard4=ycard3)
  831.     set ycard4=(random(52)-1)
  832.   end repeat
  833.   repeat while (ycard5=ycard1 or ycard5=ycard2 or ycard5=ycard3 or ycard5=ycard4)
  834.     set ycard5=(random(52)-1)
  835.   end repeat
  836.   repeat while (ycard6=ycard1 or ycard6=ycard2 or ycard6=ycard3 or ycard6=ycard4 or ycard6=ycard5)
  837.     set ycard6=(random(52)-1)
  838.   end repeat
  839.   repeat while (ycard7=ycard1 or ycard7=ycard2 or ycard7=ycard3 or ycard7=ycard4 or ycard7=ycard5 ¼
  840. or ycard7=ycard6)
  841.     set ycard7=(random(52)-1)
  842.   end repeat
  843.   repeat while (ycard8=ycard1 or ycard8=ycard2 or ycard8=ycard3 or ycard8=ycard4 or ycard8=ycard5 ¼
  844. or ycard8=ycard6 or ycard8=ycard7)
  845.     set ycard8=(random(52)-1)
  846.   end repeat
  847.   repeat while (dcard1=ycard1 or dcard1=ycard2 or dcard1=ycard3 or dcard1=ycard4 or dcard1=ycard5 ¼
  848. or dcard1=ycard6 or dcard1=ycard7 or dcard1=ycard8)
  849.     set dcard1=(random(52)-1)
  850.   end repeat
  851.   repeat while (dcard2=ycard1 or dcard2=ycard2 or dcard2=ycard3 or dcard2=ycard4 or dcard2=ycard5 ¼
  852. or dcard2=ycard6 or dcard2=ycard7 or dcard2=ycard8 or dcard2=dcard1)
  853.     set dcard2=(random(52)-1)
  854.   end repeat
  855.   repeat while (dcard3=ycard1 or dcard3=ycard2 or dcard3=ycard3 or dcard3=ycard4 or dcard3=ycard5 ¼
  856. or dcard3=ycard6 or dcard3=ycard7 or dcard3=ycard8 or dcard3=dcard1 or dcard3=dcard2)
  857.     set dcard3=(random(52)-1)
  858.   end repeat
  859.   repeat while (dcard4=ycard1 or dcard4=ycard2 or dcard4=ycard3 or dcard4=ycard4 or dcard4=ycard5 ¼
  860. or dcard4=ycard6 or dcard4=ycard7 or dcard4=ycard8 or dcard4=dcard1 or dcard4=dcard2 or dcard4=dcard3)
  861.     set dcard4=(random(52)-1)
  862.   end repeat
  863.   repeat while (dcard5=ycard1 or dcard5=ycard2 or dcard5=ycard3 or dcard5=ycard4 or dcard5=ycard5 ¼
  864. or dcard5=ycard6 or dcard5=ycard7 or dcard5=ycard8 or dcard5=dcard1 or dcard5=dcard2 or dcard5=dcard3 ¼
  865. or dcard5=dcard4)
  866.     set dcard5=(random(52)-1)
  867.   end repeat
  868.   repeat while (dcard6=ycard1 or dcard6=ycard2 or dcard6=ycard3 or dcard6=ycard4 or dcard6=ycard5 ¼
  869. or dcard6=ycard6 or dcard6=ycard7 or dcard6=ycard8 or dcard6=dcard1 or dcard6=dcard2 or dcard6=dcard3 ¼
  870. or dcard6=dcard4 or dcard6=dcard5)
  871.     set dcard6=(random(52)-1)
  872.   end repeat
  873.   repeat while (dcard7=ycard1 or dcard7=ycard2 or dcard7=ycard3 or dcard7=ycard4 or dcard7=ycard5 ¼
  874. or dcard7=ycard6 or dcard7=ycard7 or dcard7=ycard8 or dcard7=dcard1 or dcard7=dcard2 or dcard7=dcard3 ¼
  875. or dcard7=dcard4 or dcard7=dcard5 or dcard7=dcard6)
  876.     set dcard7=(random(52)-1)
  877.   end repeat
  878.   repeat while (dcard8=ycard1 or dcard8=ycard2 or dcard8=ycard3 or dcard8=ycard4 or dcard8=ycard5 ¼
  879. or dcard8=ycard6 or dcard8=ycard7 or dcard8=ycard8 or dcard8=dcard1 or dcard8=dcard2 or dcard8=dcard3 ¼
  880. or dcard8=dcard4 or dcard8=dcard5 or dcard8=dcard6 or dcard8=dcard7)
  881.     set dcard8=(random(52)-1)
  882.   end repeat
  883.   repeat while (ycard9=ycard1 or ycard9=ycard2 or ycard9=ycard3 or ycard9=ycard4 or ycard9=ycard5 ¼
  884. or ycard9=ycard6 or ycard9=ycard7 or ycard9=ycard8 or ycard9=dcard1 or ycard9=dcard2 or ycard9=dcard3 ¼
  885. or ycard9=dcard4 or ycard9=dcard5 or ycard9=dcard6 or ycard9=dcard7 or ycard9=dcard8)
  886.     set ycard9=(random(52)-1)
  887.   end repeat
  888.   repeat while (ycard10=ycard1 or ycard10=ycard2 or ycard10=ycard3 or ycard10=ycard4 or ycard10=ycard5 ¼
  889. or ycard10=ycard6 or ycard10=ycard7 or ycard10=ycard8 or ycard10=dcard1 or ycard10=dcard2 or ¼
  890. ycard10=dcard3 ¼
  891. or ycard10=dcard4 or ycard10=dcard5 or ycard10=dcard6 or ycard10=dcard7 or ycard10=dcard8 or ¼
  892. ycard10=ycard9)
  893.     set ycard10=(random(52)-1)
  894.   end repeat
  895. end shuffle